package com.qqhru.pan.server;

import com.qqhru.pan.core.constants.WPanConstants;
import com.qqhru.pan.core.response.R;
import io.swagger.annotations.Api;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication(scanBasePackages = WPanConstants.BASE_COMPONENT_SCAN_PATH)
@ServletComponentScan(basePackages = WPanConstants.BASE_COMPONENT_SCAN_PATH)
@RestController
@Api("测试接口类")
public class WPanServerLauncher {
    public static void main(String[] args) {
        SpringApplication.run(WPanServerLauncher.class, args);
    }

    @GetMapping("/hello")
    public R<String> hello(String name) {
        return R.success("hello " + name + "!");
    }
}
